package com.car.common.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

import com.car.common.Constant;
import com.car.common.util.PropertiesUtil;

/**
 * @ClassName: ApplicationListener
 * @Description: 设置全局变量
 * @author: TiTanLee
 * @date: 2019年11月30日 上午11:13:05
 */
@WebListener
public class ApplicationListener implements ServletContextListener {
	
	@Override
	public void contextInitialized(ServletContextEvent sce) {
		sce.getServletContext().setAttribute("cxt", PropertiesUtil.getGrop("web.properties", Constant.WEB_ROOT));
	}

	@Override
	public void contextDestroyed(ServletContextEvent sce) {
		
	}

}
